Traditionally, digital media data has been distributed as a stream; for example, video data may be distributed using a serial digital interface (SDI) standard for streaming data. A characteristic of a stream of data is that it provides sequential access to the data that makes it up, and once a given piece of data has been provided by the stream, it cannot be requested again—the stream has no “memory”. The use of a stream to transmit media data is particularly appropriate where the media data is of a live event, such as a sporting or news event, in which case the pieces of data making up the stream only become available to be transmitted as they occur in real time.
It is usual for the content of a programme such as a news programme to be dynamically determined as the programme is broadcast. A conventional system for producing a news programme is shown in FIG. 1. A user interface device 11 allows a user to control a running order 11a for the news programme. The running order 11a is a sequence of segments, which may include live footage provided by cameras 13a to 13b (for example of the news being read), and pre-recorded clips, advertisement breaks and so on provided by data stores 12a to 12c. The user interface 11 can be used to vary the running order as the programme is broadcast, for example by rearranging, omitted, or added to the segments that have not yet been broadcast as required to take account of events that occur (such as newly breaking news stories, problems with live footage and the like). The user interface 11 can also be used to directly manipulate the display of footage via a jog/shuttle dial, as used for example when showing slow motion replays of important parts of sports matches. The media data for the news programme is provided as a stream 14.
However, while media data has traditionally been distributed as a stream, it has become desirable to provide it as a file, for example as an MXF (Material eXchange Format) file, for reasons of cost and convenience (amongst other things). A characteristic of a file is that it allows random access; once a file is made available within a file system, a request may be made to the file system for any arbitrary piece of data from anywhere within the file.
One example of the use of a file to transmit media data is the transmission of a television programme over the Internet. This is now described with reference to FIG. 2.
First, a file corresponding to a programme comprising segments S1 to Sn is provided. The file is then converted into a file comprising converted segments S′1 to S′n, which is a file of a form suitable for transmitting over the Internet. This may for example involve transcoding the file into a different format and/or quality. The conversion of the file is indicated by the bar C.
As noted above, the provision of the programme as a file means that random access to any piece of data within the file may be required. Consequently, the conversion process C expects all segments S1 to Sn of the file to be available within the file system prior to the conversion process beginning. Requiring the entire file to be available introduces a large time overhead for the availability of the converted file for transmitting over the Internet, as conversion can only begin once the entire unconverted file is available, which consequently means that the programme the file represents must have finished. This is a particular problem with programmes such as news programmes as described above, in which the running order for the programme can vary while the programme is being broadcast, meaning that the contents of the programme is not fixed until it is broadcast, and so it not possible to obtain the unconverted file ahead of time.
One partial solution to reducing the time overhead is to reduce the time taken by the conversion process C, by providing additional computing power. However, even if the unlimited computing power were available, with the result that the time for conversion was effectively reduced to zero, the necessity to wait until the programme had finished would still remain.
While random access to data from anywhere within a file is allowed, in order to avoid the delay associated with waiting for the writing of a file to complete, file systems will commonly allow data to be read from a file while its content is still being written to the file system, even though this means that the entire file is not yet available. This are however two problems with this. First, if a request is made for data from the file that has not yet been written to the file system, the file system will return false data, for example blank padding data or garbage data. Second, it is a characteristic of writing to a file in a file system that any part of the file can be written to. This means that while the writing is in progress, data previously read from the file may overwritten. As a result, with known file systems it is not safe to begin reading from a file before it has been completely written to the file system, as until that has occurred any data read from the file cannot be trusted to be correct.
Specialised file formats are known which are intended to be read from while still being written to. Such files consist of a series of segments each containing an index indicating where data can be found in that segment. Thus, if data is written to the file sequentially it can be read sequentially without later parts of the file needing to be referred to. However, the use of these requires that both the writing and the reading of the file occur in a well-behaved manner, which cannot be relied upon. Further, it would be advantageous to provide a solution that can be used with existing devices and the standard file formats they use.
Another solution is to modify the device that implements the conversion process so that it is able to accept streamed data rather than operating upon a file. However, again it would be advantageous to provide a solution that can be used with existing devices and the standard file formats they use.
The present invention seeks to mitigate the above-mentioned problems. Alternatively and/or additionally, the present invention seeks to provide an improved file system that provides file data for a media file in a way that does not require the contents of the entire file to be determined before any file data can be provided.